<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
	"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta http-equiv="Content-Language" content="en" />
	<meta name="GENERATOR" content="PHPEclipse 1.2.0" />
	<link href="css/paginas.css" rel="stylesheet" type="text/css" />
</head>
<body>
	<div id="fundo_paginas">
		<div id="geral_paginas">
		
			<?php include 'menu.php'?>
			
			<div id="conteudo">
				<div id="titulo_pg">Videos</div>
					<?php
						include 'conexao.php';
						if(@$_GET['funcao']!="detalhes"){
							$sql = mysql_query("select * from videos");
							while($linha = mysql_fetch_array($sql)){
								$video = $linha['video'];
								$id = $linha['id'];
					?>
					<div id="videos">
						<iframe width="200" height="150" src="<?=$video?>" frameborder="0" allowfullscreen></iframe>
						<a href="?pg=videos&funcao=detalhes&id=<?=$id?>"> Detalhes </a>
					</div>
					<?php
							}
						}
						if(@$_GET['funcao']=="detalhes"){
							$id = $_GET['id'];
							$sql = mysql_query("select * from videos where id=$id");
							while($linha = mysql_fetch_array($sql)){
								$video = $linha['video'];
								$texto = $linha['texto'];
							}
					?>
						<p><?=$texto?></P>
						<p>
						<center><iframe width="460" height="259" src="<?=$video?>" frameborder="0" allowfullscreen></iframe></center>
						</p>
						<p>
						<center><a href="javascript:history.back();">Voltar</a></center>
						</p>
					<?php
						}
					?>
			</div><!--conteudo-->
			<div style="clear:both;"></div>
		</div><!--geral paginas-->
	</div><!--fundo paginas-->
</body>
</html>